<?php
/*
$JA#COPYRIGHT$
*/

defined( '_JEXEC' ) or die( 'Restricted access' );
if($number_column > 0){
?>
<div style="overflow:hidden;">
<table class="tablelist employers-list">

    <?php $j=0; for ($i=0;$i<$number_employer;$i++){
		if ( $j == $number_column || $j==0 ){ if($j>0) $j=0; ?>
		  <tr>
		<?php }?>
		<?php if (isset($items[$i])){
			$file = '';
			$j++;
			if ($items[$i]->logo)
			{
				$temp_path = str_replace('\\',DS,$items[$i]->logo);
			
				$temp_path = str_replace('/',DS,$items[$i]->logo);
				if (file_exists($temp_path))
				{
					$items[$i]->logo = jaJBResize($items[$i]->logo,$item_width,$item_height);
					$imgInfo = getimagesize($items[$i]->logo);
					$file = $items[$i]->logo;
				}
				else 
				{
					$file = 'components/com_jajobboard/images/no-image.gif';
					$imgInfo = array();
					$imgInfo[0] = $item_width;
					$imgInfo[1] = $item_height;					
				}
			}
			else 
			{
				$file = 'components/com_jajobboard/images/no-image.gif';
				$imgInfo = array();
				$imgInfo[0] = $item_width;
				$imgInfo[1] = $item_height;
			}
			$temp = JFactory::getUser($items[$i]->user_id_tmp);
			if (is_object($temp))
			$username = $temp->username;
			$username = str_replace('.', '()', $username);
			
			$url = JRoute::_("index.php?option=com_jajobboard&view=japrofiles&layout=jaview&cid[]=".$username.'&Itemid=1000');
			$frontxt = isset($items[$i]->short_desc)?$items[$i]->short_desc:'';
	   ?>
			<td width="<?php echo $width_mod/$number_column-2; ?>" style="padding-right: <?php echo $padd; ?>px; text-align:<?php echo $align; ?> !important;">
        	       <div>		
			             <a <?php if ($follow != "1") echo "rel=\"nofollow\""; ?> style="text-decoration:none;" target="<?php if ($sb != "self") { echo "_blank"; } else { echo "_self"; } ?>" href="<?php echo $url;   ?>">
                        
            				<img alt="<?php echo $username?>" width="<?php echo $imgInfo[0]; ?>" height="<?php echo $imgInfo[1]; ?>" src="<?php echo $baseurl; if ($file != "") { echo $file; } ?>" name="a<?php echo $items[$i]->id; ?>" border="1" id="a<?php echo $items[$i]->id; ?>" />
                       
        			     </a>	
        			</div>	
    		</td>
			
            <?php
		}
		else 
		{
?>
			<td width="<?php echo $width_mod/$number_column-2; ?>" style="text-align:<?php echo $align; ?> !important">
			
				<img  style="padding:<?php echo $padd;?>px;"  
            	width="<?php echo $item_width; ?>" 
	    		height="<?php echo $item_height; ?>" 
            	src="<?php echo $baseurl."modules/mod_jafeatured_employer/blank.jpg";?>" 
            	name="a" border="0" id="a" /><?php echo $strpad ?>

			</td>
<?php 
		}
		
		if ( $j > $number_column )
		echo '</tr>';
	}
	if ( $j == 0 || $j > $number_column ){
		echo '</tr>';
	}
?>
</table>
</div>
<?php }else echo " "; ?>